"""路由配置."""

from datetime import UTC, datetime

from fastapi import APIRouter

from app.core.result import Result, ok
from app.schemas.health import HealthCheckResponse
from app.utils.logger import get_logger

logger = get_logger(__name__)

router = APIRouter()


@router.get("/health", summary="基础健康检查", tags=["基础"])
async def health_check() -> Result[HealthCheckResponse]:
    """基础健康检查."""
    return ok(
        HealthCheckResponse.model_construct(
            status="healthy", timestamp=datetime.now(UTC)
        )
    )
